/**
 * @Filename: billboard.h
 * @Description:
 * @Author: chengxiaojun
 * @Email: csforgood@gmail.com
 * @Time: 2011/11/11
 */
#ifndef __BILLBOARD__H__

#define __BILLBOARD__H__

#include <boost/interprocess/managed_shared_memory.hpp>
#include <string>
#include <map>

using namespace boost;
using namespace std;

typedef std::map<std::string,int64_t> KV;

class BillBoard {
	public:
		BillBoard();
		virtual  ~BillBoard();
                void set(std::string key, int64_t value);
                void add(std::string key, int64_t value);
                int64_t get(std::string key);

                int create();
                void show(std::string key);
                void show();
	private:
		boost::interprocess::managed_shared_memory* m_memory_pool;
                KV  *m_pdata;
};

#endif
